﻿
//Author: 张亚涛
//createtime:2016-02-28 15:11:06
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class MemberAccount
    {
        public MemberAccount()
        { }
        public MemberAccount(IDataReader reader)
        {
            _id = long.Parse(reader["ID"].ToString());
            _openID = reader["OpenID"].ToString();
            if (reader["OpType"] != DBNull.Value)
            {
                _opType = reader["OpType"].ToString();
            }
            if (reader["Money"] != DBNull.Value)
            {
                _money = decimal.Parse(reader["Money"].ToString());
            }
            if (reader["Memo"] != DBNull.Value)
            {
                _memo = reader["Memo"].ToString();
            }
            if (reader["Date"] != DBNull.Value)
            {
                _date = DateTime.Parse(reader["Date"].ToString());
            }
            if (reader["TradeID"] != DBNull.Value)
            {
                _tradeID = reader["TradeID"].ToString();
            }
        }

        #region 数据库字段
        private long? _id;
        private string _openID;
        private string _opType;
        private decimal? _money;
        private string _memo;
        private DateTime? _date;
        private string _tradeID;
        #endregion

        #region 字段属性
        /// <summary>
        /// 
        /// </summary>
        public long? Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 微信ID
        /// </summary>
        public string OpenID
        {
            set { _openID = value; }
            get { return _openID; }
        }
        /// <summary>
        /// 操作类型
        /// </summary>
        public string OpType
        {
            set { _opType = value; }
            get { return _opType; }
        }
        /// <summary>
        /// 金额
        /// </summary>
        public decimal? Money
        {
            set { _money = value; }
            get { return _money; }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string Memo
        {
            set { _memo = value; }
            get { return _memo; }
        }
        /// <summary>
        /// 时间
        /// </summary>
        public DateTime? Date
        {
            set { _date = value; }
            get { return _date; }
        }
        /// <summary>
        /// 交易ID
        /// </summary>
        public string TradeID
        {
            set { _tradeID = value; }
            get { return _tradeID; }
        }
        #endregion
    }
}